package com.coscon.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.coscon.model.db.SysConfig;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysConfigMapper extends BaseMapper<SysConfig> {

    /**
     * 如果系统配置表不存在，则创建
     */
    void createSysconfigTable();

    /**
     *初始化系统配置参数
     */
    void initSysConfigDataSecurityIsUser();
    void initSysConfigDataSecurityPasswordType();
    void initSysConfigDataSecurityCustomPassword();

    List<SysConfig> getSysconfigValByKeys(@Param("configKeys") String... keys);

    /**
     * 根据key获取
     * @param configKey
     * @return
     */
    SysConfig getConfigByKey(@Param("configKey") String configKey);

    /**
     * 根据keyRightMatching  右匹配查询
     * @param keyRightMatching
     * @return
     */
    List<SysConfig> getSysconfigValRightLikeByKey(@Param("keyRightMatching") String keyRightMatching);


}
